﻿/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2017/2/4
 * 时间: 20:43
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.Text;

namespace MiniHttpServer
{
	/// <summary>
	/// Description of Logger.
	/// </summary>
	public static class Logger
	{
		public static void WriteLog(string fmt, params object[] args)
		{
			var sb = new StringBuilder();
			sb.AppendFormat("[" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "]\t" + fmt, args);
			Console.WriteLine(sb);
		}
		
		public static void WriteDebug(string fmt, params object[] args)
		{
			WriteLog("[D]" + fmt, args);
		}
		
		public static void WriteError(string fmt, params object[] args)
		{
			WriteLog("[E]" + fmt, args);
		}
		
		public static void WriteWarning(string fmt, params object[] args)
		{
			WriteLog("[W]" + fmt, args);
		}
	}
}
